package com.magus.project.yddemo.entity;

import javax.persistence.Column;
import javax.persistence.ConstraintMode;
import javax.persistence.Entity;
import javax.persistence.ForeignKey;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.magus.framework.core.entity.BaseEntity;
import com.magus.framework.system.entity.Role;
import com.magus.sis.common.entity.ComUnit;

/**
 * 指标授权
 * 
 * @author Zhang JiaWei
 * @date 2018-01-18 15:26
 */
@Entity
@Table(name = "YDDEMO_INDICATOR_ROLE")
public class IndicatorRole extends BaseEntity {

	/**   */
	private static final long serialVersionUID = 1L;

	@ManyToOne
	@JoinColumn(name = "INDICATOR_ID_", foreignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT))
	private Indicator indicator;

	@ManyToOne
	@JoinColumn(name = "COMUNIT_ID_", foreignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT))
	private ComUnit comUnit;

	@ManyToOne
	@JoinColumn(name = "ROLE_ID_", foreignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT))
	private Role role;
	@Column(name = "DIMENSION_", length = 20)
	private String dimension;

	public Indicator getIndicator() {
		return indicator;
	}

	public void setIndicator(Indicator indicator) {
		this.indicator = indicator;
	}

	public ComUnit getComUnit() {
		return comUnit;
	}

	public void setComUnit(ComUnit comUnit) {
		this.comUnit = comUnit;
	}

	public Role getRole() {
		return role;
	}

	public void setRole(Role role) {
		this.role = role;
	}

	public String getDimension() {
		return dimension;
	}

	public void setDimension(String dimension) {
		this.dimension = dimension;
	}

}
